using System.Data;
using JetBrains.Annotations;
using Microsoft.EntityFrameworkCore.Storage;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;

namespace Microsoft.EntityFrameworkCore.Dm.Storage.Internal;

public class DmDoubleTypeMapping : DoubleTypeMapping
{
	public DmDoubleTypeMapping([NotNull] string storeType, DbType? dbType = null)
		: base(storeType, dbType)
	{
	}

	protected DmDoubleTypeMapping(RelationalTypeMappingParameters parameters)
		: base(parameters)
	{
	}//IL_0001: Unknown result type (might be due to invalid IL or missing references)


	public override RelationalTypeMapping Clone(string storeType, int? size)
	{
		return new DmDoubleTypeMapping(this.Parameters.WithStoreTypeAndSize(storeType, size, null));
	}

	// Token: 0x060001B6 RID: 438 RVA: 0x00009164 File Offset: 0x00007364
	public override CoreTypeMapping Clone(ValueConverter converter)
	{
		return new DmDoubleTypeMapping(this.Parameters.WithComposedConverter(converter));
	}

	// Token: 0x060001B7 RID: 439 RVA: 0x00009188 File Offset: 0x00007388
	protected override string GenerateNonNullSqlLiteral(object value)
	{
		string text = base.GenerateNonNullSqlLiteral(value);
		if (!text.Contains("E") && !text.Contains("e"))
		{
			return text + "E0";
		}
		return text;
	}
}
